<?php


namespace App\Api\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;


class PromotionBargainGoods extends Model
{
    use HasFactory;
    protected $guarded = [];
    protected $table = 'cmc_promotion_bargain';

    public static function bargainLists($field){

        return self::query()
            ->where('start_time','<' ,date('Y-m-d H:i:s',time()))
            ->where('end_time','>' ,date('Y-m-d H:i:s',time()))
            ->where('status',1)
            ->get($field);
    }


}
